package model

import (
	"context"
	"service/ctrl"
	"service/model/mod"

	gpb "gitee.com/cloudapex/protos/crm_order/pb"
	"google.golang.org/grpc"
)

var StudentInfo studentInfo

type studentInfo struct {
	cli gpb.StudentInfoClient
}

func init() {
	ctrl.GCon.RegistClienter(mod.GCONN_CRM_ORDER, func(c *grpc.ClientConn) {
		StudentInfo.cli = gpb.NewStudentInfoClient(c)
	})
}

func (this *studentInfo) StudentAccountCreate(ctx context.Context, in *gpb.AccountCreateReq) (*gpb.AccountCreateRes, error) {
	return this.cli.StudentAccountCreate(ctx, in)
}

func (this *studentInfo) StudentAccountGet(ctx context.Context, in *gpb.AccountGetReq) (*gpb.AccountCreateRes, error) {
	return this.cli.StudentAccountGet(ctx, in)
}
